package com.e3.basdoc.bank.client;

import com.e3.basdoc.bank.model.BankModel;
import com.e3.template.tgf.TGFEditorDialog;
import com.e3.template.tgf.TGFFormPanel;
import com.e3.web.core.client.GwtAsyncCallback;

public class BankEditorDialog extends TGFEditorDialog<BankModel> {
	
	private BankRPCServiceAsync service = BankRPCService.Util.getInstance();

	@Override
	public TGFFormPanel<BankModel> createFormPanel() {
		return new BankFormPanel();
	}

	@Override
	public void executeNewService(final BankModel model, GwtAsyncCallback<BankModel> callback) {
		service.newBank(model, callback);
	}

	@Override
	public void executeModifyService(final BankModel model, GwtAsyncCallback<BankModel> callback) {
		service.modifyBank(model, callback);
	}

	@Override
	public String[] getNotNullFieldNames() {
		return BankHelper.INSTANCE.getNotNullFieldNames();
	}

}
